
{template 'common/header'} 
{php load()->func('tpl')}

{if $operation == 'display'}


<div class="main">
	<form method="post" class="form-horizontal" id="form1">
    <div class="panel panel-info">
        <div class="panel-heading">
        	问题反馈列表
        </div>
        <div class="form-group" style="width: 200px; height: 20px; margin-top: 10px; margin-left: 20px;">
   	<from method="post">		
    <input type="text" class="form-control" id="found" name="found" placeholder="请输入搜索姓名/学号">
    <input type="hidden" name="token" value="{$_W['token']}" />
    <input type="hidden" name="departmentid" value="{$department_id['department_id']}"> 
    <input type="hidden" name="op" value="search">
    <input type="submit" name="submit" class="btn btn-primary" style="float: right; margin-top: -35px; margin-right: -65px;" value="搜索">
    </from>
      </div>

        <div class="panel panel-default"> 
		<table class="table table-hover">
			<thead class="navbar-inner">
			<tr class="warning">
				<th>ID</th>
				<th>反馈类别</th>
				<th>备注</th>
				<th>图片</th>
				<th>反馈者姓名</th>
				<th>学号</th>
				<th>学院</th> 
				<th>班级</th>
				<th >更新时间</th>
        		<th>审核状态</th> 
				<th style="width: 98px;">操作</th>
			</tr>
			</thead>
			<tbody>
			{loop $list $v}
			<tr>
				<td>{$v['id']}</td>
				<td>{$v['category']}</td>
				<td>{$v['remarks']}</td>
				<td><img style="width:50px;height:30px;" src="../attachment/{$v['url']}" /></td>
				<td class="text-center">{$v['f_name']}</td> 
				<td>{$v['f_studentid']}</td>
				<td>{$v['f_collegename']}</td>
				<td>{$v['f_classname']}</td>
				<td>{$v['date']}</td>
				<td>{$v['status']}</td>
				<td><a href="{php echo $this->createWebUrl('list', array('op' => 'reply','xx_id' => $v['id']))}" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" title="查看详情">回复</a><a href="{php echo $this->createWebUrl('list', array('op'=>'del','xx_id' => $v['id']))}"  class="btn btn-default btn-sm"  data-toggle="tooltip" data-placement="bottom" title="删除"><i class="fa fa-times"></i></a></td>
			</tr>
			{/loop}
			<tr>
				<td style="text-align:center;"></td>
				<td colspan="10">
				<a class="btn btn-danger pull-left" href="{php echo $this->createWebUrl('Xxdown',array('department_id' => $department_id['department_id']))}">导出数据</a>
				</td>
			
			</tr>
			</tbody>
		</table> 
		</div>
		<div style="height: 50px; margin-left: 30%;">{$pager}</div>
    </div>
	</form>
</div>


{elseif $operation == 'search'}

<div class="main">
	<form method="post" class="form-horizontal" id="form1">
    <div class="panel panel-info">
        <div class="panel-heading">
        	问题反馈列表
        </div>
        <div class="form-group" style="width: 200px; height: 20px; margin-top: 10px; margin-left: 20px;">
   	<from method="post">		
    <input type="text" class="form-control" id="found" name="found" placeholder="请输入搜索姓名/学号">
    <input type="hidden" name="token" value="{$_W['token']}" /> 
    <input type="hidden" name="op" value="search">
    <input type="submit" name="submit" class="btn btn-primary" style="float: right; margin-top: -35px; margin-right: -65px;" value="搜索">
    </from>
      </div>

        <div class="panel panel-default"> 
		<table class="table table-hover">
			<thead class="navbar-inner">
			<tr class="warning">
				<th>ID</th>
				<th>反馈类别</th>
				<th>备注</th>
				<th>图片</th>
				<th>反馈者姓名</th>
				<th>学号</th>
				<th>学院</th> 
				<th>班级</th>
				<th >更新时间</th>
        		<th>审核状态</th> 
				<th style="width: 98px;">操作</th>
			</tr>
			</thead>
			<tbody>
			{loop $li $v}
			<tr>
				<td>{$v['id']}</td>
				<td>{$v['category']}</td>
				<td>{$v['remarks']}</td>
				<td><img style="width:50px;height:30px;" src="../attachment/{$v['url']}" /></td>
				<td class="text-center">{$v['f_name']}</td> 
				<td>{$v['f_studentid']}</td>
				<td>{$v['f_collegename']}</td>
				<td>{$v['f_classname']}</td>
				<td>{$v['date']}</td>
				<td>{$v['status']}</td>
				<td><a href="{php echo $this->createWebUrl('list', array('op' => 'reply','xx_id' => $v['id']))}" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" title="查看详情">回复</a><a href="{php echo $this->createWebUrl('list', array('op'=>'del','xx_id' => $v['id']))}"  class="btn btn-default btn-sm"  data-toggle="tooltip" data-placement="bottom" title="删除"><i class="fa fa-times"></i></a></td>
			</tr>
			{/loop}
			
			</tbody>
		</table> 
		</div>
    </div>
	</form>
</div>
{elseif $operation == 'reply'}

<div class="main">
	<form method="post" class="form-horizontal" >
    <div class="panel panel-info">
        <div class="panel-heading">
        	问题回复
        </div>
  <div style="margin-left: 30px; margin-top: 25px; margin-bottom: 30px; width: 95%; ">
  <fieldset class="form-group">
    <div style="border-bottom: 1px solid #bbb;"><label for="exampleSelect1" >反馈者姓名：{$m['f_name']}</label></div>
    <div style="border-bottom: 1px solid #bbb;"><label for="exampleSelect1">反馈者学号：{$m['f_studentid']}</label></div>
    <div style="border-bottom: 1px solid #bbb;"><label for="exampleSelect1">反馈的问题：{$m['remarks']}</label></div>
      
  </fieldset>

  <fieldset class="form-group">
    <label for="exampleInputEmail1">请输入您的解决方案：</label>
    <textarea class="form-control" id="reply" name="reply" rows="3" style="width: 99%;"></textarea>
   
    </fieldset>
    <input type="submit" name="submit" class="btn btn-primary" value="确认回复"></button>
    <input type="hidden" name="token" value="{$_W['token']}" />  
    </div>
     
    </div>
	</form>

</div>

{/if}
{template 'common/footer'}